﻿<UserControl x:Class="EniuxTest_SL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
             xmlns:frame="clr-namespace:Eniux.Web.Framework.core;assembly=Eniux.Web.Framework.core"
             xmlns:core="clr-namespace:Eniux.Web.Core;assembly=Eniux.Web.Core"
    d:DesignHeight="300" d:DesignWidth="400" >
    <UserControl.Resources>
        <Style TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="{TemplateBinding Background}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                   
                            <ContentPresenter/>
                            <Grid  Opacity="0" Margin="5">
                                <core:UIElementSizeThumb Height="3"  Background="Orange" Cursor="SizeNS" Margin="0 -4 0 0"
                     VerticalAlignment="Top" HorizontalAlignment="Stretch"/>
                                <core:UIElementSizeThumb Width="3" Cursor="SizeWE" Margin="-4 0 0 0"
                     VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
                                <core:UIElementSizeThumb Width="3" Cursor="SizeWE" Margin="0 0 -4 0"
                     VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
                                <core:UIElementSizeThumb Height="3" Cursor="SizeNS" Margin="0 0 0 -4"
                     VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
                                <core:UIElementSizeThumb Width="7" Height="7" Cursor="SizeNWSE" Margin="-6 -6 0 0"
                     VerticalAlignment="Top" HorizontalAlignment="Left"/>
                                <core:UIElementSizeThumb Width="7" Height="7" Cursor="SizeNESW" Margin="0 -6 -6 0"
                     VerticalAlignment="Top" HorizontalAlignment="Right"/>
                                <core:UIElementSizeThumb Width="7" Height="7" Cursor="SizeNESW" Margin="-6 0 0 -6"
                     VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
                                <core:UIElementSizeThumb Width="7" Height="7" Cursor="SizeNWSE" Margin="0 0 -6 -6"
                     VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
        <Grid x:Name="LayoutRoot" Background="Yellow">
    
        <StackPanel  Margin="80" Background="Red">
            <TextBlock  Margin="40"  Text="Hello, world" Name="myTextBlock" />
        </StackPanel>

        <frame:CommonWindow Width="200" Height="200" Margin="0,0,50,90" HorizontalAlignment="Left" VerticalAlignment="Top" Background="Green" Name="myStackPanel"/>
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="248,33,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>
</UserControl>
